/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UIView : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UIView); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UIView, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodInvalidateIntrinsicContentSize0;
        bool isCallingInvalidateIntrinsicContentSize0= false;
        
            public override void InvalidateIntrinsicContentSize() 
            { 
                if (methodInvalidateIntrinsicContentSize0 == null && instance!=null )
                {
                    methodInvalidateIntrinsicContentSize0 = instance.Type.GetMethod("InvalidateIntrinsicContentSize", 0);
                }
                if (methodInvalidateIntrinsicContentSize0 != null && !isCallingInvalidateIntrinsicContentSize0)
                {
                    isCallingInvalidateIntrinsicContentSize0 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodInvalidateIntrinsicContentSize0, instance, null );
                        
                        
                        
                        isCallingInvalidateIntrinsicContentSize0 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In InvalidateIntrinsicContentSize *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.InvalidateIntrinsicContentSize();
                        
                    

                }
            }
        
        
        
        IMethod methodWillDrawLayer1;
        bool isCallingWillDrawLayer1= false;
        
            public override void WillDrawLayer(CoreAnimation.CALayer p0) 
            { 
                if (methodWillDrawLayer1 == null && instance!=null )
                {
                    methodWillDrawLayer1 = instance.Type.GetMethod("WillDrawLayer", 1);
                }
                if (methodWillDrawLayer1 != null && !isCallingWillDrawLayer1)
                {
                    isCallingWillDrawLayer1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillDrawLayer1, instance, param );
                        
                        
                        isCallingWillDrawLayer1 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillDrawLayer *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillDrawLayer(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodWillMoveToSuperview2;
        bool isCallingWillMoveToSuperview2= false;
        
            public override void WillMoveToSuperview(UIKit.UIView p0) 
            { 
                if (methodWillMoveToSuperview2 == null && instance!=null )
                {
                    methodWillMoveToSuperview2 = instance.Type.GetMethod("WillMoveToSuperview", 1);
                }
                if (methodWillMoveToSuperview2 != null && !isCallingWillMoveToSuperview2)
                {
                    isCallingWillMoveToSuperview2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillMoveToSuperview2, instance, param );
                        
                        
                        isCallingWillMoveToSuperview2 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillMoveToSuperview *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillMoveToSuperview(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodWillMoveToWindow3;
        bool isCallingWillMoveToWindow3= false;
        
            public override void WillMoveToWindow(UIKit.UIWindow p0) 
            { 
                if (methodWillMoveToWindow3 == null && instance!=null )
                {
                    methodWillMoveToWindow3 = instance.Type.GetMethod("WillMoveToWindow", 1);
                }
                if (methodWillMoveToWindow3 != null && !isCallingWillMoveToWindow3)
                {
                    isCallingWillMoveToWindow3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillMoveToWindow3, instance, param );
                        
                        
                        isCallingWillMoveToWindow3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillMoveToWindow *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillMoveToWindow(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodWillRemoveSubview4;
        bool isCallingWillRemoveSubview4= false;
        
            public override void WillRemoveSubview(UIKit.UIView p0) 
            { 
                if (methodWillRemoveSubview4 == null && instance!=null )
                {
                    methodWillRemoveSubview4 = instance.Type.GetMethod("WillRemoveSubview", 1);
                }
                if (methodWillRemoveSubview4 != null && !isCallingWillRemoveSubview4)
                {
                    isCallingWillRemoveSubview4 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillRemoveSubview4, instance, param );
                        
                        
                        isCallingWillRemoveSubview4 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillRemoveSubview *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillRemoveSubview(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodIntrinsicContentSize5;
        bool isCallingIntrinsicContentSize5= false;
        
            public override CoreGraphics.CGSize IntrinsicContentSize
            { 
                
                get{
                    if (methodIntrinsicContentSize5 == null && instance!=null )
                    {
                        methodIntrinsicContentSize5 = instance.Type.GetMethod("get_IntrinsicContentSize", 0);
                    }
                    if (methodIntrinsicContentSize5 != null && !isCallingIntrinsicContentSize5)
                    {
                        isCallingIntrinsicContentSize5 = true;

                        try{
                            object ret = appDomain.Invoke(methodIntrinsicContentSize5, instance, null );
                            isCallingIntrinsicContentSize5 = false;
                            return (CoreGraphics.CGSize)ret;
                        }
                        catch(Exception e){
                            mb.App.logger.Log("**** Catch Exception In IntrinsicContentSize *****");
                            mb.App.logger.Log(e.ToString());
                            mb.App.logger.Log("**********************");
                            throw e;
                        }
                    }
                    else
                    {
                        return base.IntrinsicContentSize;
                    }
                }
                
                
            }
        
        
        
        IMethod methodIsAccessibilityElement6;
        bool isCallingIsAccessibilityElement6= false;
        
            public override System.Boolean IsAccessibilityElement
            { 
                
                get{
                    if (methodIsAccessibilityElement6 == null && instance!=null )
                    {
                        methodIsAccessibilityElement6 = instance.Type.GetMethod("get_IsAccessibilityElement", 0);
                    }
                    if (methodIsAccessibilityElement6 != null && !isCallingIsAccessibilityElement6)
                    {
                        isCallingIsAccessibilityElement6 = true;

                        try{
                            object ret = appDomain.Invoke(methodIsAccessibilityElement6, instance, null );
                            isCallingIsAccessibilityElement6 = false;
                            return (System.Boolean)ret;
                        }
                        catch(Exception e){
                            mb.App.logger.Log("**** Catch Exception In IsAccessibilityElement *****");
                            mb.App.logger.Log(e.ToString());
                            mb.App.logger.Log("**********************");
                            throw e;
                        }
                    }
                    else
                    {
                        return base.IsAccessibilityElement;
                    }
                }
                
                
            }
        
        
        
        IMethod methodWillChange7;
        bool isCallingWillChange7= false;
        
            public override void WillChange(Foundation.NSKeyValueChange p0, Foundation.NSIndexSet p1, Foundation.NSString p2) 
            { 
                if (methodWillChange7 == null && instance!=null )
                {
                    methodWillChange7 = instance.Type.GetMethod("WillChange", 3);
                }
                if (methodWillChange7 != null && !isCallingWillChange7)
                {
                    isCallingWillChange7 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodWillChange7, instance, param );
                        
                        
                        isCallingWillChange7 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodWillChange8;
        bool isCallingWillChange8= false;
        
            public override void WillChange(Foundation.NSString p0, Foundation.NSKeyValueSetMutationKind p1, Foundation.NSSet p2) 
            { 
                if (methodWillChange8 == null && instance!=null )
                {
                    methodWillChange8 = instance.Type.GetMethod("WillChange", 3);
                }
                if (methodWillChange8 != null && !isCallingWillChange8)
                {
                    isCallingWillChange8 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                                p1,
                                p2,
                        };
                        object ret = appDomain.Invoke(methodWillChange8, instance, param );
                        
                        
                        isCallingWillChange8 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillChange(p0, p1, p2);
                        
                    

                }
            }
        
        
        
        IMethod methodWillChangeValue9;
        bool isCallingWillChangeValue9= false;
        
            public override void WillChangeValue(System.String p0) 
            { 
                if (methodWillChangeValue9 == null && instance!=null )
                {
                    methodWillChangeValue9 = instance.Type.GetMethod("WillChangeValue", 1);
                }
                if (methodWillChangeValue9 != null && !isCallingWillChangeValue9)
                {
                    isCallingWillChangeValue9 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodWillChangeValue9, instance, param );
                        
                        
                        isCallingWillChangeValue9 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In WillChangeValue *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.WillChangeValue(p0);
                        
                    

                }
            }
        
        
    }
}